package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.SalaryBasicAddDTO;
import org.jsola.hr.dto.SalaryBasicUpdateDTO;
import org.jsola.hr.query.SalaryBasicQuery;
import org.jsola.hr.query.SalaryChangesQuery;
import org.jsola.hr.vo.SalaryBasicListVO;
import org.jsola.hr.vo.SalaryBasicVO;
import org.jsola.hr.vo.SalaryChangesVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * 员工薪资表
 *
 * @author zhr
 */
@Api(tags = "hr-员工薪资表")
public interface ISalaryBasicControllerAPI {

    /**
     * 新增员工薪资表
     *
     * @param salaryBasicAddDTO 员工薪资表新增实体
     * @return 员工薪资表展示对象
     */
    @ApiOperation(value = "新增员工薪资表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicAddDTO", dataType = "SalaryBasicAddDTO", value = "新增员工薪资表", paramType = "body")
    })
    Result<SalaryBasicVO> save(SalaryBasicAddDTO salaryBasicAddDTO);


    /**
     * 修改员工薪资表
     *
     * @param salaryBasicUpdateDTO 员工薪资表
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工薪资表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicUpdateDTO", dataType = "SalaryBasicUpdateDTO", value = "修改员工薪资表", paramType = "body")
    })
    Result<Integer> update(SalaryBasicUpdateDTO salaryBasicUpdateDTO);


    /**
     * 删除单个员工薪资表，彻底删除
     *
     * @param salaryBasicId 员工薪资表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个员工薪资表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicId", dataType = "String", value = "员工薪资表id", paramType = "path")
    })
    Result<Integer> delete(String salaryBasicId);


    /**
     * 批量删除员工薪资表，彻底删除
     *
     * @param salaryBasicIds 员工薪资表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工薪资表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicIds", dataType = "String[]", value = "员工薪资表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] salaryBasicIds);


    /**
     * 根据员工薪资表id查询员工薪资表详情
     *
     * @param salaryBasicId 员工薪资表id
     * @return 员工薪资表详情
     */
    @ApiOperation(value = "根据员工薪资表id查询员工薪资表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicId", dataType = "String", value = "员工薪资表id", paramType = "path")
    })
    Result<SalaryBasicVO> findById(String salaryBasicId);


    /**
     * 查询员工薪资表
     *
     * @param salaryBasicQuery 员工薪资表查询参数
     * @return page
     */
    @ApiOperation(value = "查询员工薪资表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicQuery", dataType = "SalaryBasicQuery", value = "员工薪资表查询参数", paramType = "query")
    })
    Result<List<SalaryBasicListVO>> listAll(SalaryBasicQuery salaryBasicQuery);


    /**
     * 分页查询员工薪资表
     *
     * @param salaryBasicQuery 员工薪资表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询员工薪资表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicQuery", dataType = "SalaryBasicQuery", value = "员工薪资表查询参数", paramType = "query")
    })
    Result<Page<SalaryBasicListVO>> page(SalaryBasicQuery salaryBasicQuery);

    /**
     * 保存工资基础信息
     *
     * @param salaryBasicAddDTO 工资基础信息DTO
     * @return 更新数量
     */
    @ApiOperation(value = "保存工资基础信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicAddDTO", dataType = "SalaryBasicAddDTO", value = "保存工资基础信息", paramType = "body")
    })
    Result<SalaryBasicVO> saveSalaryBasic(@Valid @RequestBody SalaryBasicAddDTO salaryBasicAddDTO);

    /**
     * 员工薪资档案列表
     *
     * @return
     */
    @ApiOperation(value = "员工薪资档案列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicAddDTO", dataType = "SalaryBasicQuery", value = "保存工资基础信息", paramType = "query")
    })
    Result<Page<SalaryBasicVO>> selectPageEmpSalary(SalaryBasicQuery salaryBasicAddDTO);

    /**
     * 定薪功能查询员工信息
     *
     * @param id
     * @return
     */
    @ApiOperation(value = "定薪功能查询员工信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", dataType = "String", value = "员工表主键id", paramType = "query")
    })
    Result<SalaryBasicVO> selectEmpSalary(String id);

    /**
     * 定薪保存功能
     *
     * @param salaryBasicAddDTO
     * @return
     */
    @ApiOperation(value = "定薪保存")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicAddDTO", dataType = "SalaryBasicAddDTO", value = "保存工资基础信息", paramType = "body")
    })
    Result<Integer> insertEmpSalary(@Valid @RequestBody SalaryBasicAddDTO salaryBasicAddDTO);

    /**
     * 调薪保存
     *
     * @param salaryBasicAddDTO
     * @return
     */
    @ApiOperation(value = "调薪保存")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryBasicAddDTO", dataType = "SalaryBasicAddDTO", value = "保存工资基础信息", paramType = "body")
    })
    Result<Integer> updateEmpSalary(@Valid @RequestBody SalaryBasicAddDTO salaryBasicAddDTO);

    /**
     * 薪资详情
     *
     * @param salaryChangesQuery
     * @return
     */
    @ApiOperation(value = "薪资详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "salaryChangesQuery", dataType = "SalaryChangesQuery", value = "保存工资基础信息", paramType = "query")
    })
    Result<Page<SalaryChangesVO>> selectPageChanges(SalaryChangesQuery salaryChangesQuery);

}

